home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
macros
/
tip
/
font-cpp.tip
< prev
next >
Wrap
Text File
|
1993-09-15
|
2KB
|
46 lines
% This macro source file is from the four volume series
% "TeX in Practice" by Stephan von Bechtolsheim, published
% 1993 by Springer-Verlag, New York.
% Copyright 1993 Stephan von Bechtolsheim.
% No warranty or liability is assumed.
% This macro may be copied freely if no fees other than
% media cost or shipping charges are charged and as long
% as this copyright and the following source code itself
% is not changed. Please see the series for further information.
%
% Version: 1.0
% Date: May 1, 1993
%
%
% This source code is documented in 16.2.11, p. II-283.
% Original source in file "fonts2.TEX", starting line 1007.
\wlog{L: "font-cpp.tip" ["fonts2.TEX," l. 1007, p. II-283]}%
% This file DOES belong to format "texip."
\InputD{leadingz.tip}
\InputD{imodn.tip}
\def\CharactersPerPica #1{%
\setbox0 = \hbox{%
#1\relax
This paragraph has 423 characters. We know that
because we counted it. It is very simple to count, because
the Emacs editor we are using has a function ``advance
by one character.'' And with the prefix command (that's
Emacs terminology) you can execute ``advance by
one character'' 423~times. Now, let's hope that this text
is representative of ordinary text so that our average
number of characters per pica is correct.
}%
{%
\count1 = \wd0
\divide\count1 by 100
\count0 = 423
\multiply\count0 by 65536
\multiply\count0 by 12
\divide\count0 by \count1
\count2 = \count0
\divide\count2 by 100
\IModN{\count0}{100}{\count3}%
\the\count2.\LeadingZ{\count3}%
}%
}